Split bundle_ui manifest emission into a separate 'bundle' lifecycle phase#7414
Draft
isaacroldan wants to merge 3 commits intomainfrom
Draft
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
…phase The `bundle_ui` step previously carried a `generatesAssetsManifest: boolean` config that fired for every command (`build`, `dev`, `deploy`) because the framework hardcoded a single `'deploy'` lifecycle. The flag is the smell: bundle_ui was doing two jobs and conditionally turning the second one off. This change splits the manifest emission into its own step (`generate_ui_assets_manifest`) and replaces the single `'deploy'` lifecycle with two additive phases: - `'build'` — local build (run by `shopify app build`). - `'bundle'` — extra steps run after `'build'` when bundling for upload (driven by `dev` and `deploy`). Specs only declare a `'bundle'` group when they need to do more than the local build. `extension.build()` composes them: `'build'` runs only the build steps; `'bundle'` runs `[...buildSteps, ...bundleSteps]` in declaration order. No spec needs to duplicate steps across both groups. For `ui_extension`: `'build'` runs `bundle_ui`; `'bundle'` adds `generate_ui_assets_manifest` and `include_assets`. Net result: `shopify app build` no longer emits `manifest.json` for `ui_extension`; `dev` and `deploy` are unchanged. The other 13 specs simply rename `lifecycle: 'deploy'` → `lifecycle: 'build'` — same behavior as before across all three commands. `include_assets` keeps its own `generatesAssetsManifest` flag (out of scope for this PR; same cleanup pattern can be applied later). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
include_assets is conceptually a bundle-time step: it copies extension assets into the bundle output and (for some specs) emits manifest.json. It has no role in producing local build artifacts. For the 5 specs whose only client step is include_assets — admin, admin_link, channel, flow_template, order_attribution_config — move the group from 'build' to 'bundle'. After this, `shopify app build` is a no-op for these extension types; they run during dev/deploy as before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…methods The lifecycle parameter was a flag argument signaling "this method does two things." Splitting into two named methods makes each one do one thing, and the composition (build then bundle) becomes plain code at the one call site that needs it: buildForBundle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
edec753 to
a8f8574
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
How to test your changes?
Post-release steps
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add